//
//  STFileViewController.h
//  smart_transferor
//
//  Created by wtc on 11-11-2.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

@class STAppDelegate;
@protocol STFileScreenDelegate;
@class STFileItem;
@interface STFileViewController : UIViewController <UIScrollViewDelegate>
{
    NSMutableArray *filelist;
    NSMutableArray *filelistImage;
    NSMutableArray *filelistVideo;
    NSMutableArray *filelistAudio;
    NSMutableArray *filelistAll;

    NSMutableArray *screenList;
    id<STFileScreenDelegate>  app;
    BOOL pageControlUsed;
    int numScreens;
    int maxScreens;
    NSString * absDir;
}
@property (retain, nonatomic) IBOutlet UIScrollView *scrollView;
@property (retain, nonatomic) id<STFileScreenDelegate> app;
@property (retain, nonatomic) IBOutlet UIPageControl *pageControl;
@property (retain, nonatomic)  NSMutableArray *screenList;
@property (retain, nonatomic)  NSMutableArray *filelist;
@property (retain, nonatomic)  NSMutableArray *filelistAll;
@property (retain, nonatomic)  NSMutableArray *filelistImage;
@property (retain, nonatomic)  NSMutableArray *filelistVideo;
@property (retain, nonatomic)  NSMutableArray *filelistAudio;
@property (retain, nonatomic) IBOutlet UISegmentedControl *segControl;
@property (retain, nonatomic) NSString * absDir;

- (IBAction) changePage:(id)sender;
- (IBAction)returnClicked:(id)sender;
- (IBAction)changeSegment:(id)sender;
- (void) loadScrollViewWithPage:(int)page;
- (void) scrollViewDidScroll:(UIScrollView *)sender;
- (void) initFileList;
- (void) initScreenList;
- (void) initView;
- (void) resetViewWhenChangeFileList:(NSMutableArray *)newFilelist;
- (void) insertItem:(STFileItem *)item;
- (void) drawNewItem:(STFileItem *)item;
- (NSMutableArray *) filterFileList:(NSMutableArray *)filelist ByType:(int)type;
@end
